package com.gmrz.webauthn.protocol.v1.processor;


import com.gmrz.uaf.common.IErrorCode;

public class WebAuthnCborException
        extends Exception {
    private static final long serialVersionUID = -8178445331791652361L;
    IErrorCode ec;

    public WebAuthnCborException(IErrorCode ec) {
        super(ec.toString());
        this.ec = ec;
    }

    public WebAuthnCborException(IErrorCode ec, String msg) {
        super((msg == null ? "" : msg) + ec.toString());
        this.ec = ec;
    }

    public WebAuthnCborException(IErrorCode ec, Throwable t) {
        super(ec.toString(), t);
        this.ec = ec;
    }

    public WebAuthnCborException(IErrorCode ec, String msg, Throwable t) {
        super((msg == null ? "" : msg) + ec.toString(), t);
        this.ec = ec;
    }

    public IErrorCode getErrorCode() {
        return this.ec;
    }
}
